<?php
/**
 * Created by PhpStorm.
 * User: Mak
 * Date: 2016/1/13
 * Time: 15:46
 */

include "../../config.php";
header("Content-type: text/html; charset=utf-8");

//焦点图修改
if(!empty($_POST['jdt']) && isset($_POST['jdt'])){
    $image=$_POST['image'];
    $link=$_POST['link'];
    $title=$_POST['title'];
    $dis=$_POST['dis'];
    $sql="insert into index_focus (image,link,title,dis) value ('{$image}','{$link}','{$title}','{$dis}')";
    if($mysqli->query($sql)){
        echo "<script> alert('添加成功');window.location.href='../jdt.php'; </script>";
    }else{
        echo "<script> alert('添加失败');window.location.href='../jdt.php'; </script>";
    }
}
//首页修改->公司简介
elseif(!empty($_POST['igsjj']) && isset($_POST['igsjj'])){
    $img=$_POST['img'];
    $title=$_POST['title'];
    $contacts=$_POST['contacts'];
    $dis=$_POST['dis'];
}